<template>
  <div
    class="login-container"
    v-loading="loading"
    element-loading-text="登录中..."
    element-loading-spinner="el-icon-loading"
    element-loading-background="rgba(0,0,0,0.8)"
  >
    <router-view :key="key"></router-view>
  </div>
</template>

<script>
export default {
  name: "UserLogin",
  data() {
    return {
      loading: false,
    };
  },
  computed: {
    key() {
      return this.$route.path + Math.random();
    },
  },
};
</script>

<style>
/* 修改element样式 */
.el-form {
  width: 430px;
  /* min-height: 320px; */
  background: rgba(0, 0, 0, 0.6);
  padding: 20px;
  box-sizing: border-box;
  border-radius: 10px;
  text-align: center;
  position: fixed;
  margin: auto;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  /* box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8); */
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}
.el-form-item {
  width: 270px;
  margin: 20px auto;
}
.el-input {
  display: inline-block;
}
.el-input__inner {
  color: #fff;
  font-size: 18px;
  background-color: transparent;
  border: 0px;
  border-bottom: 2px solid #fff;
  border-radius: 0;
  padding-left: 34px;
  /* caret-color: #2f4f4f; */
}
.el-input__inner::placeholder {
  color: rgba(169, 169, 169, 0.7);
  font-size: 16px;
}
</style>
<style scoped>
.login-container {
  height: 100vh;
  background: url("@/assets/images/24hr-Earth_11.jpeg") no-repeat;
  background-position: center center;
  background-size: cover;
}
</style>
